package com.ibeeking.found.cop.service.common.enums;

public enum WxCpMessageTaskSendStatusEnum {
    MESSAGE_TASK_STATUS_NO_SEND(0, "未发送"),
    MESSAGE_TASK_STATUS_SEND_OK(1, "已发送"),
    MESSAGE_TASK_STATUS_FAIL_NOT_FRIEND(2, "因客户不是好友导致发送失败"),
    MESSAGE_TASK_STATUS_FAIL_FROM_OTHER(3, "因客户已经收到其他群发消息导致发送失败"),
    ;
    private Integer code;
    private String desc;

    WxCpMessageTaskSendStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (WxCpMessageTaskSendStatusEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
